﻿<Window x:Class="JsEditor.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:custom="clr-namespace:DockingLibrary;assembly=DockingLibrary" Loaded="OnLoaded" Closing="OnClosing"
    Title="JsEditor" Height="Auto" Width="Auto" WindowStartupLocation="CenterScreen" WindowState="Maximized" Icon="/JsEditor;component/Icons/title.ico">
    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="文件">
                <MenuItem Header="新建文件"  Click="NewDocument">
                    <MenuItem.Icon>
                        <Image   Width="16" Height="16">
                            <Image.Source>
                                <BitmapImage  UriSource=" /JsEditor;component/Icons/page_2.png" />
                            </Image.Source>
                        </Image>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="打开文件" Click="OpenDocument">
                    <MenuItem.Icon>
                        <Image  Width="16" Height="16">
                            <Image.Source>
                                <BitmapImage  UriSource=" /JsEditor;component/Icons/page_code.png" />
                            </Image.Source>
                        </Image>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="保存文件"  Click="SaveDocument">
                    <MenuItem.Icon>
                        <Image   Width="16" Height="16">
                            <Image.Source>
                                <BitmapImage  UriSource=" /JsEditor;component/Icons/page_save.png" />
                            </Image.Source>
                        </Image>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="另存为.." Click="SaveAsDocument"/>
                <MenuItem Header="保存所有" Click="SaveAllDocument"/>
                <MenuItem Header="退出"  Click="ExitApplication">
                    <MenuItem.Icon>
                        <Image   Width="16" Height="16">
                            <Image.Source>
                                <BitmapImage  UriSource=" /JsEditor;component/Icons/exit.ico" />
                            </Image.Source>
                        </Image>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <!--<MenuItem Header="编辑"/>-->
            <MenuItem Header="运行">
                <MenuItem Header="运行脚本"  Click="RunScript">
                    <MenuItem.Icon>
                        <Image  Width="16" Height="16">
                            <Image.Source>
                                <BitmapImage  UriSource=" /JsEditor;component/Icons/script.ico" />
                            </Image.Source>
                        </Image>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="清除命令"  Click="ClearConsole"/>
                <MenuItem Header="重启控制台" Click="ReStartConsole"/>
            </MenuItem>
            <MenuItem Header="视图">
                <!--<MenuItem Header="Explorer" Click="ShowExplorerWindow"/>-->
                <MenuItem Header="输出窗口" Click="ShowOutputWindow"/>
                <!--<MenuItem Header="Property" Click="ShowPropertyWindow"/>
                <MenuItem Header="ToDoList" Click="ShowListWindow"/>-->
            </MenuItem>
            <MenuItem Header="帮助" Click="MenuItem_Click" />
        </Menu>
        <Grid>
            <!--<Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>-->
            <custom:DockManager Name ="dockManager"  Background="Gray"/>
            <!--<GridSplitter HorizontalAlignment="Right" Margin="5,0,0,0" Background="Black" Width="3"  />-->

        </Grid>
    </DockPanel>
</Window>
